home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Panorama / Panorama - Disk 19D (1987-07-22)(Pacific North-West Amigas Club)[WB].zip / Panorama - Disk 19D (1987-07-22)(Pacific North-West Amigas Club)[WB].adf / PipeHandler1.2 / cc next >
AmigaDOS Script File  |  1987-06-28  |  648b  |  30 lines

  1. .KEY xxx_file,opt1,opt2,opt3
  2. ;           Compile a C program                       Version 4.00
  3. ;           Works with Lattice version 3.03 and above
  4.  
  5. IF NOT EXISTS <xxx_file>.c
  6.     ECHO "File <xxx_file>.c does not exist."
  7.     SKIP END
  8. ENDIF
  9.  
  10. ECHO "-- compiling...<xxx_file>.c"
  11.  
  12. IF NOT EXISTS "Ram:cctempdir"
  13.     MAKEDIR Ram:cctempdir
  14. ENDIF
  15.  
  16. :c/LC1 <opt1> <opt2> <opt3> -oRam:cctempdir/cctemp.q -i:include/ -i:include/lattice/ <xxx_file>
  17.  
  18. IF NOT EXISTS "Ram:cctempdir/cctemp.q"
  19.     ECHO "Compile failed."
  20.     QUIT 20
  21. ENDIF
  22.  
  23. :c/LC2 -v -o<xxx_file>.o Ram:cctempdir/cctemp
  24.  
  25. DELETE Ram:cctempdir all
  26.  
  27. ECHO "-- done compiling '<xxx_file>'. --"
  28.  
  29. LAB END
  30.